package huawei.js2025;

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

/**
 * 日志上报
 */
public class Question28 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<Integer> logs = Arrays.stream(sc.nextLine().trim().split(" ")).map(Integer::parseInt).collect(Collectors.toList());

        int maxScore = 0; // 最大分数
        int logCount = 0;// 日志条数
        for (int i = 0; i < logs.size(); i++) {
            logCount += logs.get(i);
            int momentScore = Math.min(logCount, 100); // 上报分数
            // 减去延迟上报的分数
            int bei = 1;
            for (int j = i - 1; j >= 0; j--) {
                momentScore -= logs.get(j) * bei;
                bei += 1;
            }
            maxScore = Math.max(momentScore, maxScore);
            if (logCount >= 100) break;
        }

        System.out.println(maxScore);
    }
}
